package com.alibaba.shopping_order_service.mapper;

import com.alibaba.shopping_common.pojo.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单 mapper
 */
public interface OrdersMapper extends BaseMapper<Orders> {

    // 查询订单详情
    Orders findOrdersById(String id);

    /**
     * 查询用户所有的订单
     * @param userId
     * @param status
     * @return
     */
    List<Orders>findOrderByUserIdAndStatus(@Param("userId")Long userId, @Param("status")Integer status);
}
